﻿//=====================================================================================================
// LocalizationLibrary
// The Localization Library is a collection of reusable software component that provide 
// support for localization. This library enable you to localize WPF, Silverlight and WP7 applications.
// (http://localizationlibrary.codeplex.com)
//=====================================================================================================
// Author: Nicola Gallo (Website: www.nicola.gallo.name, Email: nicolagmt@hotmail.it) 
//=====================================================================================================

namespace HelloWorld.Startup
{
    //.NET References
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;

    // Microsoft References
    using Microsoft.Phone.Controls;

    /// <summary>
    /// MainPage.
    /// </summary>
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor

        /// <summary>
        /// Default constructor.
        /// </summary>
        public MainPage()
        {
            InitializeComponent();
        }

        //Methods

        /// <summary>
        /// Initializes view.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            Binding binding = new Binding("IsLocalizing");
            binding.Source = LocalizationLibrary.LocalizationManager.EngineInfo;
            binding.Converter = new Converters.BoolVisibilityConverter();
            this.waitingPanel.SetBinding(UserControl.VisibilityProperty, binding);
        }
    }
}